import request from '@/utils/request'


// 列表
export function list(query) {
  return request({
    url: '/enterpriseCertification/page',
    method: 'get',
    params: query
  })
}

//详情
export function detail(id) {
  return request({
    url: '/enterpriseCertification/'+id,
    method: 'get',
  })
}

//新增
export function add(data) {
  return request({
    url: '/enterpriseCertification',
    method: 'post',
    data: data
  })
}

//修改
export function edit(data) {
  return request({
    url: '/enterpriseCertification',
    method: 'put',
    data: data
  })
}


//签章方式
export function signatureMethod(data) {
  return request({
    url: '/enterpriseCertification/signatureMethod',
    method: 'PATCH',
    data: data
  })
}

//认证
export function certification(id) {
  return request({
    url: '/enterpriseCertification/certification/'+id,
    method: 'post'
  })
}


//删除
export function deleteList(id) {
  return request({
    url: '/enterpriseCertification/'+id,
    method: 'DELETE'
  })
}


//门店列表
export function getAllStrore(query) {
  return request({
    url: '/store/store/getAllStore',
    method: 'GET',
    params: query
  })
}


//关联企业认证
export function association(data) {
  return request({
    url: '/store/store/association',
    method: 'post',
    data: data
  })
}

// 获取电子合同数目
export function getElectronicContractCount() {
  return request({
    url: 'enterpriseCertification/getElectronicContractCount',
    method: 'get'
  })
}


